@extends('admin.layout')
@section('content')
   <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                商品属性管理
                <small>添加</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 后台主页</a></li>
                <li><a href="#">属性管理</a></li>
                <li class="active">属性添加</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">快速添加属性</h3>
                        </div><!-- /.box-header -->
                 
                        <!-- form start -->
                        <form role="form" action="{{ url('/admin/type/insert')}}" method='post' enctype='multipart/form-data'>
                                  {{csrf_field()}}
                            <div class="box-body">
                        @if (count($errors) > 0)
                             <div class="alert alert-danger" id='error'>
                               <ul>
                                 @foreach ($errors->all() as $error)
                                   <li>{{ $error }}</li>
                                 @endforeach
                               </ul>
                             </div>
                         @endif

                            <script type="text/javascript">
                                window.onload = function()
                                {
                                    $("#error").hide(3000);
                                }


                            </script>
                                  <!-- select -->
                              
                                <div class="form-group">
                                    <label>商品名</label>
                                    <select class="form-control" name='gid'>
                                       @foreach($data as $res)
                                        <option value="{{$res -> id}}">{{$res -> name}}</option>
                                       @endforeach
                                    </select>
                                </div>
                      

                               

                                  <div class="form-group">
                                    <label>颜色</label>
                                    <select class="form-control" name='color'>

                               
                                     
                                        <option value='玫瑰金'>玫瑰金</option>
                                        <option value='香槟金'>香槟金</option>
                                        <option value='月光银'>月光银</option>
                                   
                                    </select>
                                </div>

                                <div class="form-group">
                                    <label for="exampleInputEmail1">机身尺寸</label>
                                    <input type="text" class="form-control" id="username" name="size"
                                           placeholder="请输入机身尺寸">
                                </div>
                               
                                <div class="form-group">
                                    <label>网络类型</label>
                                    <select class="form-control" name='network'>
                                        <option value='移动'>移动</option>
                                        <option value='全网通'>全网通</option>
                                    </select>
                                </div>
                               
                                <div class="form-group">
                                    <label for="exampleInputEmail1">库存</label>
                                    <input type="text" class="form-control" id="username" name="count"
                                           placeholder="请输入库存数量">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">内存</label>
                                    <input type="text" class="form-control" id="username" name="memory"
                                           placeholder="请输入内存大小">
                                </div>  

                                <div class="form-group">
                                    <label for="exampleInputEmail1">屏幕尺寸</label>
                                    <input type="text" class="form-control" id="username" name="screen"
                                           placeholder="请输入屏幕尺寸">
                                </div>       
                                 
                                  <div class="form-group">
                                    <label for="exampleInputEmail1">电池容量</label>
                                    <input type="text" class="form-control" id="username" name="cell"
                                           placeholder="请输入电池容量">
                                </div>  

                                 <div class="form-group">
                                    <label for="exampleInputEmail1">重量</label>
                                    <input type="text" class="form-control" id="username" name="kg"
                                           placeholder="请输入机体重量">
                                </div>       
                                 
                                 <div class="form-group">
                                    <label for="exampleInputEmail1">屏幕分辨率</label>
                                    <input type="text" class="form-control" id="username" name="show"
                                           placeholder="请输入屏幕分辨率">
                                </div>

                                 <div class="form-group">
                                    <label for="exampleInputEmail1">存储</label>
                                    <input type="text" class="form-control" id="username" name="resever"
                                           placeholder="请输入存储容量">
                                </div>            
                                  
                                 <div class="form-group">
                                    <label for="exampleInputEmail1">cup</label>
                                    <input type="text" class="form-control" id="username" name="cpu"
                                           placeholder="请输入cup">
                                </div>   

                                 <div class="form-group">
                                    <label for="exampleInputEmail1">前置摄像头</label>
                                    <input type="text" class="form-control" id="username" name="f_camera"
                                           placeholder="请输入前置摄像头像素大小">
                                </div>  
                                <div class="form-group">
                                    <label for="exampleInputEmail1">后置摄像头</label>
                                    <input type="text" class="form-control" id="username" name="b_camera"
                                           placeholder="请输入后置摄像头像素大小">
                                </div>    
                                 <div class="form-group">
                                    <label for="exampleInputEmail1">系统版本</label>
                                    <input type="text" class="form-control" id="username" name="stytem"
                                           placeholder="请输入系统版本">
                                </div> 
                                <div class="form-group">
                                    <label for="exampleInputEmail1">配置清单</label>
                                    <input type="text" class="form-control" id="username" name="list"
                                           placeholder="请输入配置清单">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">品牌</label>
                                    <input type="text" class="form-control" id="username" name="brand"
                                           placeholder="请输入品牌">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">型号</label>
                                    <input type="text" class="form-control" id="username" name="type"
                                           placeholder="请输入型号">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">线长</label>
                                    <input type="text" class="form-control" id="username" name="length"
                                           placeholder="请输入线长">
                                </div>
                        </div><!-- /.box-body -->

                                    
                                      
                                   
                               
                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">商品添加</button>
                            </div>
                        </form>
                    

                   
                   
                    <!-- Input addon -->
              
            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->


@endsection